﻿IF OBJECT_ID('up_MapHtml_AssetDistributionTransformer') IS not NULL
DROP PROC up_MapHtml_AssetDistributionTransformer

IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'up_MapHtml_AssetDistributionTransformer')
	DROP PROCEDURE up_MapHtml_AssetDistributionTransformer
GO

CREATE proc [dbo].[up_MapHtml_AssetDistributionTransformer] (@id int) as

/*
	by: ariel hualpa
	on: November 09
	to: select google earth balloon html for a distribution meter
*/

-- return either the record value in the table or the function result if record value is null

select dbo.fn_MapHTML_AssetDistributionTransformer(@Id)

